package com.alcj.service.impl;

import com.alcj.mapper.OrderMapper;
import com.alcj.model.Order;
import com.alcj.service.OrderDetailListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by jdz on 2017/11/8.
 */
@Service
public class OrderDetailListServiceImpl implements OrderDetailListService{

    @Autowired
    OrderMapper orderMapper;
    /**
     * 查询本用户的所有订单
     * @param order
     * @return
     */
    @Override
    public List<Order> selectListByUserIdAndStatusNew(Order order){
        return orderMapper.selectListByUserIdAndStatusNew(order);
    }
    /**
     * 查询本用户的所有订单
     * @param order
     * @return
     */
    @Override
    public List<Order> selectListByUserIdAndStatusOld(Order order){
        return orderMapper.selectListByUserIdAndStatusOld(order);
    }
    /**
     * 删除本条订单
     * @param orderId
     * @return
     */
    @Override
    public int deleteByPrimaryKey(String orderId){
        return orderMapper.deleteByPrimaryKey(orderId);
    }

}
